<?php

namespace app\common\model\printmanager;

use think\Model;


class GoodsFile extends Model
{


    // 表名
    protected $name = 'self_goods_file';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'cdn_url'
    ];


    public function getCdnUrlAttr($value, $data)
    {
        return isset($data['file_url']) && $data['file_url'] ? cdnurl($data['file_url']) : '';
    }
}
